<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

    /**
     * Constructor de la clase makinita.
     * @param array $entrada
     * @param array $reglas
     * @return boolean $error
     */

     
class sfTdModelBase extends sfTdBase{
    
    /**
     * Constructor.
     *
     * Available options:
     *
     *  * id_format:       The format for the generated HTML id attributes (%s by default)
     *  * is_hidden:       true if the form widget must be hidden, false otherwise (false by default)
     *  * default:         The default value to use when rendering the widget
     *  * title:           The title to use when the widget is rendered
     *  * link:            The link of the widget
     *  * field:           The path to de data in DB
     *                      i.e:
     *                          Worker.Person.name
     * 
     * @param array $options     An array of options
     * @param array $attributes  An array of default HTML attributes
     *
     * @see sfWidget
     */
    public function __construct($options = array(), $attributes = array())
    {
      $this->addOption('field', null);
      $this->addOption('leaf', null);      
      parent::__construct($options, $attributes);
    }    

    
    /**
     * Sets the field for the widget.
     *
     * @param string $value The field
     *    *
     * @return sfWidget The current widget instance
     */

      public function setField($field) {
          $this->setOption('field', $field);     
          return $this;
      }


    public function getField() {
      return $this->getOption('field');
    }
    
    public function isModelTd() {
        return true;
    }

}


?>
